projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10a5b20
)
extensions: clamping to [0.0, 1.0] is not needed
author
Téo Mazars
<teo.mazars@ensimag.fr>
Sun, 30 Jun 2013 13:58:43 +0000
(15:58 +0200)
committer
Téo Mazars
<teo.mazars@ensimag.fr>
Sun, 30 Jun 2013 14:01:26 +0000
(16:01 +0200)
As babl allows out of sRGB gamut values.
extensions/CIE.c
patch
|
blob
|
history
diff --git
a/extensions/CIE.c
b/extensions/CIE.c
index b83a07e69776e90755f7323bfb97c257e234cdf6..5f340513ad14344219fc07869746df9406cf5866 100644
(file)
--- a/
extensions/CIE.c
+++ b/
extensions/CIE.c
@@
-933,11
+933,6
@@
static const double LRAMP = 7.99959199;
static double xnn, znn;
-#ifndef CLAMP
-#define CLAMP(x, l, u) ((x) < (l) ? (l) : ((x) > (u) ? (u) : (x)))
-#endif
-
-
typedef double CMatrix[3][3];
typedef double CVector[3];
@@
-1282,11
+1277,6
@@
cpercep_space_to_rgb (double inr,
xyz_to_rgb (&inr, &ing, &inb);
- /* yes, essential. :( */
- inr = CLAMP (inr, 0.0, 1.0);
- ing = CLAMP (ing, 0.0, 1.0);
- inb = CLAMP (inb, 0.0, 1.0);
-
*outr = inr;
*outg = ing;
*outb = inb;